package com.jd.charactercalculator;

import weibo4j.Oauth;
import weibo4j.model.WeiboException;
import weibo4j.util.BareBonesBrowserLaunch;

/**
 * @ClassName:Test
 * @Description: 
 * @author :孙林
 * @date :2012-8-27上午11:22:37
 */
public class Test {

	/**
	 * 
	 * 
	 * @param args
	 * @throws WeiboException 
	 */

	
	public static void main(String[] args) throws WeiboException {
		//授权
		Oauth oauth = new Oauth();
		//打开网址,配置在config里面，获取code
		BareBonesBrowserLaunch.openURL(oauth.authorize("code"));
		
		//在返回的url里面会带上code，直接获取code

		oauth.getToken();

	}

}
